<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP, ViewPatterns #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-- | Provides factilities for pretty-printing 'Delta's in a way appropriate for</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- user facing pattern match warnings.</span><span>
</span><span id="line-7"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.HsToCore.PmCheck.Ppr</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-8"></span><span>        </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprUncovered"><span class="hs-identifier">pprUncovered</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html"><span class="hs-identifier">GHC.Types.Var.Env</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.DFM.html"><span class="hs-identifier">GHC.Types.Unique.DFM</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html"><span class="hs-identifier">GHC.Core.ConLike</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#"><span class="hs-identifier">Control.Monad.Trans.RWS.CPS</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#NonEmpty"><span class="hs-identifier">NonEmpty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#nonEmpty"><span class="hs-identifier">nonEmpty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#toList"><span class="hs-identifier">toList</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html"><span class="hs-identifier">GHC.HsToCore.PmCheck.Types</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Oracle.html"><span class="hs-identifier">GHC.HsToCore.PmCheck.Oracle</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-comment">-- | Pretty-print the guts of an uncovered value vector abstraction, i.e., its</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- components and refutable shapes associated to any mentioned variables.</span><span>
</span><span id="line-33"></span><span class="hs-comment">--</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- Example for @([Just p, q], [p :-&gt; [3,4], q :-&gt; [0,5]])@:</span><span>
</span><span id="line-35"></span><span class="hs-comment">--</span><span>
</span><span id="line-36"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- (Just p) q</span><span>
</span><span id="line-38"></span><span class="hs-comment">--     where p is not one of {3, 4}</span><span>
</span><span id="line-39"></span><span class="hs-comment">--           q is not one of {0, 5}</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-41"></span><span class="hs-comment">--</span><span>
</span><span id="line-42"></span><span class="hs-comment">-- When the set of refutable shapes contains more than 3 elements, the</span><span>
</span><span id="line-43"></span><span class="hs-comment">-- additional elements are indicated by &quot;...&quot;.</span><span>
</span><span id="line-44"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprUncovered"><span class="hs-identifier hs-type">pprUncovered</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#Delta"><span class="hs-identifier hs-type">Delta</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-45"></span><span id="pprUncovered"><span class="annot"><span class="annottext">pprUncovered :: Delta -&gt; [Id] -&gt; SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprUncovered"><span class="hs-identifier hs-var hs-var">pprUncovered</span></a></span></span><span> </span><span id="local-6989586621681146107"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146107"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span id="local-6989586621681146106"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146106"><span class="hs-identifier hs-var">vas</span></a></span></span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UniqDFM Id (SDoc, [PmAltCon]) -&gt; Bool
forall key elt. UniqDFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.DFM.html#isNullUDFM"><span class="hs-identifier hs-var">isNullUDFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDFM Id (SDoc, [PmAltCon])
</span><a href="#local-6989586621681146104"><span class="hs-identifier hs-var">refuts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146102"><span class="hs-identifier hs-var">vec</span></a></span><span> </span><span class="hs-comment">-- there are no refutations</span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146102"><span class="hs-identifier hs-var">vec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-48"></span><span>                          </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;where&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Unique, (SDoc, [PmAltCon])) -&gt; SDoc)
-&gt; [(Unique, (SDoc, [PmAltCon]))] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(SDoc, [PmAltCon]) -&gt; SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprRefutableShapes"><span class="hs-identifier hs-var">pprRefutableShapes</span></a></span><span> </span><span class="annot"><span class="annottext">((SDoc, [PmAltCon]) -&gt; SDoc)
-&gt; ((Unique, (SDoc, [PmAltCon])) -&gt; (SDoc, [PmAltCon]))
-&gt; (Unique, (SDoc, [PmAltCon]))
-&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique, (SDoc, [PmAltCon])) -&gt; (SDoc, [PmAltCon])
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDFM Id (SDoc, [PmAltCon]) -&gt; [(Unique, (SDoc, [PmAltCon]))]
forall key elt. UniqDFM key elt -&gt; [(Unique, elt)]
</span><a href="GHC.Types.Unique.DFM.html#udfmToList"><span class="hs-identifier hs-var">udfmToList</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDFM Id (SDoc, [PmAltCon])
</span><a href="#local-6989586621681146104"><span class="hs-identifier hs-var">refuts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-50"></span><span>    </span><span id="local-6989586621681146094"><span class="annot"><span class="annottext">init_prec :: PprPrec
</span><a href="#local-6989586621681146094"><span class="hs-identifier hs-var hs-var">init_prec</span></a></span></span><span>
</span><span id="line-51"></span><span>      </span><span class="hs-comment">-- No outer parentheses when it's a unary pattern by assuming lowest</span><span>
</span><span id="line-52"></span><span>      </span><span class="hs-comment">-- precedence</span><span>
</span><span id="line-53"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146106"><span class="hs-identifier hs-var">vas</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#topPrec"><span class="hs-identifier hs-var">topPrec</span></a></span><span>
</span><span id="line-54"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span>
</span><span id="line-55"></span><span>    </span><span id="local-6989586621681146088"><span class="annot"><span class="annottext">ppr_action :: RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
</span><a href="#local-6989586621681146088"><span class="hs-identifier hs-var hs-var">ppr_action</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc)
-&gt; [Id] -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146094"><span class="hs-identifier hs-var">init_prec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146106"><span class="hs-identifier hs-var">vas</span></a></span><span>
</span><span id="line-56"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681146102"><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146102"><span class="hs-identifier hs-var">vec</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681146085"><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146085"><span class="hs-identifier hs-var">renamings</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Delta
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
-&gt; ([SDoc], DIdEnv SDoc)
forall a. Delta -&gt; PmPprM a -&gt; (a, DIdEnv SDoc)
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#runPmPpr"><span class="hs-identifier hs-var">runPmPpr</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146107"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
</span><a href="#local-6989586621681146088"><span class="hs-identifier hs-var">ppr_action</span></a></span><span>
</span><span id="line-57"></span><span>    </span><span id="local-6989586621681146104"><span class="annot"><span class="annottext">refuts :: UniqDFM Id (SDoc, [PmAltCon])
</span><a href="#local-6989586621681146104"><span class="hs-identifier hs-var hs-var">refuts</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Delta -&gt; DIdEnv SDoc -&gt; UniqDFM Id (SDoc, [PmAltCon])
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#prettifyRefuts"><span class="hs-identifier hs-var">prettifyRefuts</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146107"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146085"><span class="hs-identifier hs-var">renamings</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-comment">-- | Output refutable shapes of a variable in the form of @var is not one of {2,</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- Nothing, 3}@. Will never print more than 3 refutable shapes, the tail is</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- indicated by an ellipsis.</span><span>
</span><span id="line-62"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprRefutableShapes"><span class="hs-identifier hs-type">pprRefutableShapes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltCon"><span class="hs-identifier hs-type">PmAltCon</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-63"></span><span id="pprRefutableShapes"><span class="annot"><span class="annottext">pprRefutableShapes :: (SDoc, [PmAltCon]) -&gt; SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprRefutableShapes"><span class="hs-identifier hs-var hs-var">pprRefutableShapes</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681146082"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146082"><span class="hs-identifier hs-var">var</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681146081"><span class="annot"><span class="annottext">[PmAltCon]
</span><a href="#local-6989586621681146081"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146082"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is not one of&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[PmAltCon] -&gt; SDoc
</span><a href="#local-6989586621681146080"><span class="hs-identifier hs-var">format_alts</span></a></span><span> </span><span class="annot"><span class="annottext">[PmAltCon]
</span><a href="#local-6989586621681146081"><span class="hs-identifier hs-var">alts</span></a></span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>    </span><span id="local-6989586621681146080"><span class="annot"><span class="annottext">format_alts :: [PmAltCon] -&gt; SDoc
</span><a href="#local-6989586621681146080"><span class="hs-identifier hs-var hs-var">format_alts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; ([PmAltCon] -&gt; SDoc) -&gt; [PmAltCon] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([PmAltCon] -&gt; [SDoc]) -&gt; [PmAltCon] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc])
-&gt; ([PmAltCon] -&gt; [SDoc]) -&gt; [PmAltCon] -&gt; [SDoc]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc]
</span><a href="#local-6989586621681146076"><span class="hs-identifier hs-var">shorten</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc])
-&gt; ([PmAltCon] -&gt; [SDoc]) -&gt; [PmAltCon] -&gt; [SDoc]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(PmAltCon -&gt; SDoc) -&gt; [PmAltCon] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">PmAltCon -&gt; SDoc
</span><a href="#local-6989586621681146075"><span class="hs-identifier hs-var">ppr_alt</span></a></span><span>
</span><span id="line-67"></span><span>    </span><span id="local-6989586621681146076"><span class="annot"><span class="annottext">shorten :: [SDoc] -&gt; [SDoc]
</span><a href="#local-6989586621681146076"><span class="hs-identifier hs-var hs-var">shorten</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681146074"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146074"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681146073"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146073"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681146072"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146072"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[SDoc]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146074"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146073"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146072"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;...&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-68"></span><span>    </span><span class="annot"><a href="#local-6989586621681146076"><span class="hs-identifier hs-var">shorten</span></a></span><span> </span><span id="local-6989586621681146071"><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146071"><span class="hs-identifier hs-var">xs</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146071"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-69"></span><span>    </span><span id="local-6989586621681146075"><span class="annot"><span class="annottext">ppr_alt :: PmAltCon -&gt; SDoc
</span><a href="#local-6989586621681146075"><span class="hs-identifier hs-var hs-var">ppr_alt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltConLike"><span class="hs-identifier hs-type">PmAltConLike</span></a></span><span> </span><span id="local-6989586621681146067"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681146067"><span class="hs-identifier hs-var">cl</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681146067"><span class="hs-identifier hs-var">cl</span></a></span><span>
</span><span id="line-70"></span><span>    </span><span class="annot"><a href="#local-6989586621681146075"><span class="hs-identifier hs-var">ppr_alt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltLit"><span class="hs-identifier hs-type">PmAltLit</span></a></span><span> </span><span id="local-6989586621681146064"><span class="annot"><span class="annottext">PmLit
</span><a href="#local-6989586621681146064"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PmLit -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">PmLit
</span><a href="#local-6989586621681146064"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">{- 1. Literals
~~~~~~~~~~~~~~
Starting with a function definition like:

    f :: Int -&gt; Bool
    f 5 = True
    f 6 = True

The uncovered set looks like:
    { var |&gt; var /= 5, var /= 6 }

Yet, we would like to print this nicely as follows:
   x , where x not one of {5,6}

Since these variables will be shown to the programmer, we give them better names
(t1, t2, ..) in 'prettifyRefuts', hence the SDoc in 'PrettyPmRefutEnv'.

2. Residual Constraints
~~~~~~~~~~~~~~~~~~~~~~~
Unhandled constraints that refer to HsExpr are typically ignored by the solver
(it does not even substitute in HsExpr so they are even printed as wildcards).
Additionally, the oracle returns a substitution if it succeeds so we apply this
substitution to the vectors before printing them out (see function `pprOne' in
&quot;GHC.HsToCore.PmCheck&quot;) to be more precise.
-}</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- | Extract and assigns pretty names to constraint variables with refutable</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- shapes.</span><span>
</span><span id="line-100"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#prettifyRefuts"><span class="hs-identifier hs-type">prettifyRefuts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#Delta"><span class="hs-identifier hs-type">Delta</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DIdEnv"><span class="hs-identifier hs-type">DIdEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DIdEnv"><span class="hs-identifier hs-type">DIdEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltCon"><span class="hs-identifier hs-type">PmAltCon</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span id="prettifyRefuts"><span class="annot"><span class="annottext">prettifyRefuts :: Delta -&gt; DIdEnv SDoc -&gt; UniqDFM Id (SDoc, [PmAltCon])
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#prettifyRefuts"><span class="hs-identifier hs-var hs-var">prettifyRefuts</span></a></span></span><span> </span><span id="local-6989586621681146063"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146063"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Unique, (SDoc, [PmAltCon]))] -&gt; UniqDFM Id (SDoc, [PmAltCon])
forall elt key. [(Unique, elt)] -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#listToUDFM_Directly"><span class="hs-identifier hs-var">listToUDFM_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">([(Unique, (SDoc, [PmAltCon]))] -&gt; UniqDFM Id (SDoc, [PmAltCon]))
-&gt; (DIdEnv SDoc -&gt; [(Unique, (SDoc, [PmAltCon]))])
-&gt; DIdEnv SDoc
-&gt; UniqDFM Id (SDoc, [PmAltCon])
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Unique, SDoc) -&gt; (Unique, (SDoc, [PmAltCon])))
-&gt; [(Unique, SDoc)] -&gt; [(Unique, (SDoc, [PmAltCon]))]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique, SDoc) -&gt; (Unique, (SDoc, [PmAltCon]))
forall {k} {a}. Uniquable k =&gt; (k, a) -&gt; (k, (a, [PmAltCon]))
</span><a href="#local-6989586621681146061"><span class="hs-identifier hs-var">attach_refuts</span></a></span><span> </span><span class="annot"><span class="annottext">([(Unique, SDoc)] -&gt; [(Unique, (SDoc, [PmAltCon]))])
-&gt; (DIdEnv SDoc -&gt; [(Unique, SDoc)])
-&gt; DIdEnv SDoc
-&gt; [(Unique, (SDoc, [PmAltCon]))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">DIdEnv SDoc -&gt; [(Unique, SDoc)]
forall key elt. UniqDFM key elt -&gt; [(Unique, elt)]
</span><a href="GHC.Types.Unique.DFM.html#udfmToList"><span class="hs-identifier hs-var">udfmToList</span></a></span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-103"></span><span>    </span><span id="local-6989586621681146061"><span class="annot"><span class="annottext">attach_refuts :: (k, a) -&gt; (k, (a, [PmAltCon]))
</span><a href="#local-6989586621681146061"><span class="hs-identifier hs-var hs-var">attach_refuts</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681146058"><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621681146058"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681146057"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681146057"><span class="hs-identifier hs-var">sdoc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621681146058"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681146057"><span class="hs-identifier hs-var">sdoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Delta -&gt; k -&gt; [PmAltCon]
forall k. Uniquable k =&gt; Delta -&gt; k -&gt; [PmAltCon]
</span><a href="GHC.HsToCore.PmCheck.Oracle.html#lookupRefuts"><span class="hs-identifier hs-var">lookupRefuts</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146063"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621681146058"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span class="hs-keyword">type</span><span> </span><span id="PmPprM"><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-var">PmPprM</span></a></span></span><span> </span><span id="local-6989586621681146055"><span class="annot"><a href="#local-6989586621681146055"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#RWS"><span class="hs-identifier hs-type">RWS</span></a></span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#Delta"><span class="hs-identifier hs-type">Delta</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#DIdEnv"><span class="hs-identifier hs-type">DIdEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621681146055"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- Try nice names p,q,r,s,t before using the (ugly) t_i</span><span>
</span><span id="line-109"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#nameList"><span class="hs-identifier hs-type">nameList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-110"></span><span id="nameList"><span class="annot"><span class="annottext">nameList :: [SDoc]
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#nameList"><span class="hs-identifier hs-var hs-var">nameList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; SDoc) -&gt; [String] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;p&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;q&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;r&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;s&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;t&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc] -&gt; [SDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-111"></span><span>            </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'t'</span></span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681146052"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681146052"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681146052"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span class="hs-glyph">..</span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span id="local-6989586621681146235"><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#runPmPpr"><span class="hs-identifier hs-type">runPmPpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#Delta"><span class="hs-identifier hs-type">Delta</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-type">PmPprM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681146235"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681146235"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DIdEnv"><span class="hs-identifier hs-type">DIdEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-114"></span><span id="runPmPpr"><span class="annot"><span class="annottext">runPmPpr :: forall a. Delta -&gt; PmPprM a -&gt; (a, DIdEnv SDoc)
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#runPmPpr"><span class="hs-identifier hs-var hs-var">runPmPpr</span></a></span></span><span> </span><span id="local-6989586621681146049"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146049"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span id="local-6989586621681146048"><span class="annot"><span class="annottext">PmPprM a
</span><a href="#local-6989586621681146048"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PmPprM a
-&gt; Delta -&gt; (DIdEnv SDoc, [SDoc]) -&gt; (a, (DIdEnv SDoc, [SDoc]), ())
forall w r s a. Monoid w =&gt; RWS r w s a -&gt; r -&gt; s -&gt; (a, s, w)
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#runRWS"><span class="hs-identifier hs-var">runRWS</span></a></span><span> </span><span class="annot"><span class="annottext">PmPprM a
</span><a href="#local-6989586621681146048"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146049"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DIdEnv SDoc
forall a. DVarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyDVarEnv"><span class="hs-identifier hs-var">emptyDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#nameList"><span class="hs-identifier hs-var">nameList</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681146045"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681146045"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681146044"><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146044"><span class="hs-identifier hs-var">renamings</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681146045"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146044"><span class="hs-identifier hs-var">renamings</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="hs-comment">-- | Allocates a new, clean name for the given 'Id' if it doesn't already have</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- one.</span><span>
</span><span id="line-119"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#getCleanName"><span class="hs-identifier hs-type">getCleanName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-type">PmPprM</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-120"></span><span id="getCleanName"><span class="annot"><span class="annottext">getCleanName :: Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#getCleanName"><span class="hs-identifier hs-var hs-var">getCleanName</span></a></span></span><span> </span><span id="local-6989586621681146042"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146042"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681146041"><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146041"><span class="hs-identifier hs-var">renamings</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681146040"><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146040"><span class="hs-identifier hs-var">name_supply</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RWST Delta () (DIdEnv SDoc, [SDoc]) Identity (DIdEnv SDoc, [SDoc])
forall (m :: * -&gt; *) r w s. Monad m =&gt; RWST r w s m s
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-122"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681146038"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146038"><span class="hs-identifier hs-var">clean_name</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681146037"><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146037"><span class="hs-identifier hs-var">name_supply'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146040"><span class="hs-identifier hs-var">name_supply</span></a></span><span>
</span><span id="line-123"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DIdEnv SDoc -&gt; Id -&gt; Maybe SDoc
forall a. DVarEnv a -&gt; Id -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupDVarEnv"><span class="hs-identifier hs-var">lookupDVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146041"><span class="hs-identifier hs-var">renamings</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146042"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-124"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681146035"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146035"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146035"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-125"></span><span>    </span><span class="annot"><span class="annottext">Maybe SDoc
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-126"></span><span>      </span><span class="annot"><span class="annottext">(DIdEnv SDoc, [SDoc])
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity ()
forall (m :: * -&gt; *) s r w. Monad m =&gt; s -&gt; RWST r w s m ()
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#put"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DIdEnv SDoc -&gt; Id -&gt; SDoc -&gt; DIdEnv SDoc
forall a. DVarEnv a -&gt; Id -&gt; a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#extendDVarEnv"><span class="hs-identifier hs-var">extendDVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">DIdEnv SDoc
</span><a href="#local-6989586621681146041"><span class="hs-identifier hs-var">renamings</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146042"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146038"><span class="hs-identifier hs-var">clean_name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681146037"><span class="hs-identifier hs-var">name_supply'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>      </span><span class="annot"><span class="annottext">SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146038"><span class="hs-identifier hs-var">clean_name</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#checkRefuts"><span class="hs-identifier hs-type">checkRefuts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-type">PmPprM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- the clean name if it has negative info attached</span><span>
</span><span id="line-130"></span><span id="checkRefuts"><span class="annot"><span class="annottext">checkRefuts :: Id -&gt; PmPprM (Maybe SDoc)
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#checkRefuts"><span class="hs-identifier hs-var hs-var">checkRefuts</span></a></span></span><span> </span><span id="local-6989586621681146031"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146031"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-131"></span><span>  </span><span id="local-6989586621681146030"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146030"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RWST Delta () (DIdEnv SDoc, [SDoc]) Identity Delta
forall (m :: * -&gt; *) r w s. Monad m =&gt; RWST r w s m r
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-132"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Delta -&gt; Id -&gt; [PmAltCon]
forall k. Uniquable k =&gt; Delta -&gt; k -&gt; [PmAltCon]
</span><a href="GHC.HsToCore.PmCheck.Oracle.html#lookupRefuts"><span class="hs-identifier hs-var">lookupRefuts</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146030"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146031"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-133"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe SDoc -&gt; PmPprM (Maybe SDoc)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe SDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-comment">-- Will just be a wildcard later on</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">[PmAltCon]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Maybe SDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; Maybe SDoc)
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
-&gt; PmPprM (Maybe SDoc)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#getCleanName"><span class="hs-identifier hs-var">getCleanName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146031"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="hs-comment">-- | Pretty print a variable, but remember to prettify the names of the variables</span><span>
</span><span id="line-137"></span><span class="hs-comment">-- that refer to neg-literals. The ones that cannot be shown are printed as</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- underscores. Even with a type signature, if it's not too noisy.</span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-type">pprPmVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-type">PmPprM</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-140"></span><span class="hs-comment">-- Type signature is &quot;too noisy&quot; by my definition if it needs to parenthesize.</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- I like           &quot;not matched: _ :: Proxy (DIdEnv SDoc)&quot;,</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- but I don't like &quot;not matched: (_ :: stuff) (_:_) (_ :: Proxy (DIdEnv SDoc))&quot;</span><span>
</span><span id="line-143"></span><span class="hs-comment">-- The useful information in the latter case is the constructor that we missed,</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- not the types of the wildcards in the places that aren't matched as a result.</span><span>
</span><span id="line-145"></span><span id="pprPmVar"><span class="annot"><span class="annottext">pprPmVar :: PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var hs-var">pprPmVar</span></a></span></span><span> </span><span id="local-6989586621681146027"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146027"><span class="hs-identifier hs-var">prec</span></a></span></span><span> </span><span id="local-6989586621681146026"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146026"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-146"></span><span>  </span><span id="local-6989586621681146025"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146025"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RWST Delta () (DIdEnv SDoc, [SDoc]) Identity Delta
forall (m :: * -&gt; *) r w s. Monad m =&gt; RWST r w s m r
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-147"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Delta -&gt; Id -&gt; Maybe (PmAltCon, [Id], [Id])
</span><a href="GHC.HsToCore.PmCheck.Oracle.html#lookupSolution"><span class="hs-identifier hs-var">lookupSolution</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146025"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146026"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-148"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681146023"><span class="annot"><span class="annottext">PmAltCon
</span><a href="#local-6989586621681146023"><span class="hs-identifier hs-var">alt</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681146022"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146022"><span class="hs-identifier hs-var">_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681146021"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146021"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PprPrec
-&gt; PmAltCon
-&gt; [Id]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmAltCon"><span class="hs-identifier hs-var">pprPmAltCon</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146027"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">PmAltCon
</span><a href="#local-6989586621681146023"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146021"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-149"></span><span>    </span><span class="annot"><span class="annottext">Maybe (PmAltCon, [Id], [Id])
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Maybe SDoc -&gt; SDoc
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681146018"><span class="hs-identifier hs-var">typed_wildcard</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe SDoc -&gt; SDoc)
-&gt; PmPprM (Maybe SDoc)
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; PmPprM (Maybe SDoc)
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#checkRefuts"><span class="hs-identifier hs-var">checkRefuts</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146026"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-150"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-comment">-- if we have no info about the parameter and would just print a</span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-comment">-- wildcard, also show its type.</span><span>
</span><span id="line-153"></span><span>        </span><span id="local-6989586621681146018"><span class="annot"><span class="annottext">typed_wildcard :: SDoc
</span><a href="#local-6989586621681146018"><span class="hs-identifier hs-var hs-var">typed_wildcard</span></a></span></span><span>
</span><span id="line-154"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146027"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#sigPrec"><span class="hs-identifier hs-var">sigPrec</span></a></span><span>
</span><span id="line-155"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#underscore"><span class="hs-identifier hs-var">underscore</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;::&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Kind -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681146026"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-157"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#underscore"><span class="hs-identifier hs-var">underscore</span></a></span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmAltCon"><span class="hs-identifier hs-type">pprPmAltCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltCon"><span class="hs-identifier hs-type">PmAltCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-type">PmPprM</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-160"></span><span id="pprPmAltCon"><span class="annot"><span class="annottext">pprPmAltCon :: PprPrec
-&gt; PmAltCon
-&gt; [Id]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmAltCon"><span class="hs-identifier hs-var hs-var">pprPmAltCon</span></a></span></span><span> </span><span id="local-6989586621681146010"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146010"><span class="hs-identifier hs-var">_prec</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltLit"><span class="hs-identifier hs-type">PmAltLit</span></a></span><span> </span><span id="local-6989586621681146009"><span class="annot"><span class="annottext">PmLit
</span><a href="#local-6989586621681146009"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PmLit -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">PmLit
</span><a href="#local-6989586621681146009"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmAltCon"><span class="hs-identifier hs-var">pprPmAltCon</span></a></span><span> </span><span id="local-6989586621681146008"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146008"><span class="hs-identifier hs-var">prec</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltConLike"><span class="hs-identifier hs-type">PmAltConLike</span></a></span><span> </span><span id="local-6989586621681146007"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681146007"><span class="hs-identifier hs-var">cl</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681146006"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146006"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-162"></span><span>  </span><span id="local-6989586621681146005"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146005"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RWST Delta () (DIdEnv SDoc, [SDoc]) Identity Delta
forall (m :: * -&gt; *) r w s. Monad m =&gt; RWST r w s m r
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.CPS.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-163"></span><span>  </span><span class="annot"><span class="annottext">Delta
-&gt; PprPrec
-&gt; ConLike
-&gt; [Id]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprConLike"><span class="hs-identifier hs-var">pprConLike</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146005"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146008"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681146007"><span class="hs-identifier hs-var">cl</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146006"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprConLike"><span class="hs-identifier hs-type">pprConLike</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#Delta"><span class="hs-identifier hs-type">Delta</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html#ConLike"><span class="hs-identifier hs-type">ConLike</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmPprM"><span class="hs-identifier hs-type">PmPprM</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-166"></span><span id="pprConLike"><span class="annot"><span class="annottext">pprConLike :: Delta
-&gt; PprPrec
-&gt; ConLike
-&gt; [Id]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprConLike"><span class="hs-identifier hs-var hs-var">pprConLike</span></a></span></span><span> </span><span id="local-6989586621681146003"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146003"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span id="local-6989586621681146002"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681146002"><span class="hs-identifier hs-var">_prec</span></a></span></span><span> </span><span id="local-6989586621681146001"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681146001"><span class="hs-identifier hs-var">cl</span></a></span></span><span> </span><span id="local-6989586621681146000"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146000"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-167"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681145999"><span class="annot"><span class="annottext">PmExprList
</span><a href="#local-6989586621681145999"><span class="hs-identifier hs-var">pm_expr_list</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Delta -&gt; PmAltCon -&gt; [Id] -&gt; Maybe PmExprList
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pmExprAsList"><span class="hs-identifier hs-var">pmExprAsList</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681146003"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConLike -&gt; PmAltCon
</span><a href="GHC.HsToCore.PmCheck.Types.html#PmAltConLike"><span class="hs-identifier hs-var">PmAltConLike</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681146001"><span class="hs-identifier hs-var">cl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681146000"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-168"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PmExprList
</span><a href="#local-6989586621681145999"><span class="hs-identifier hs-var">pm_expr_list</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-169"></span><span>      </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#NilTerminated"><span class="hs-identifier hs-type">NilTerminated</span></a></span><span> </span><span id="local-6989586621681145996"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145996"><span class="hs-identifier hs-var">list</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-170"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#brackets"><span class="hs-identifier hs-var">brackets</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; ([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc)
-&gt; [Id] -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145996"><span class="hs-identifier hs-var">list</span></a></span><span>
</span><span id="line-171"></span><span>      </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#WcVarTerminated"><span class="hs-identifier hs-type">WcVarTerminated</span></a></span><span> </span><span id="local-6989586621681145993"><span class="annot"><span class="annottext">NonEmpty Id
</span><a href="#local-6989586621681145993"><span class="hs-identifier hs-var">pref</span></a></span></span><span> </span><span id="local-6989586621681145992"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145992"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-172"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span>   </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; ([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fcat"><span class="hs-identifier hs-var">fcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc)
-&gt; [Id] -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NonEmpty Id -&gt; [Id]
forall a. NonEmpty a -&gt; [a]
</span><a href="../../base/src/Data.List.NonEmpty.html#toList"><span class="hs-identifier hs-var">toList</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty Id
</span><a href="#local-6989586621681145993"><span class="hs-identifier hs-var">pref</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [Id] -&gt; [Id]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145992"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-173"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprConLike"><span class="hs-identifier hs-var">pprConLike</span></a></span><span> </span><span id="local-6989586621681145988"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681145988"><span class="hs-identifier hs-var">_delta</span></a></span></span><span> </span><span id="local-6989586621681145987"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681145987"><span class="hs-identifier hs-var">_prec</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681145985"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681145985"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681145984"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145984"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedTupleCon"><span class="hs-identifier hs-var">isUnboxedTupleCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681145985"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681145982"><span class="annot"><span class="annottext">hash_parens :: SDoc -&gt; SDoc
</span><a href="#local-6989586621681145982"><span class="hs-identifier hs-var hs-var">hash_parens</span></a></span></span><span> </span><span id="local-6989586621681145981"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681145981"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;(#&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681145981"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#)&quot;</span></span><span>
</span><span id="line-176"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="#local-6989586621681145982"><span class="hs-identifier hs-var">hash_parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; ([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc)
-&gt; [Id] -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145984"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isTupleDataCon"><span class="hs-identifier hs-var">isTupleDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681145985"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-178"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; ([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
-&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc)
-&gt; [Id] -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145984"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-179"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pprConLike"><span class="hs-identifier hs-var">pprConLike</span></a></span><span> </span><span id="local-6989586621681145979"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681145979"><span class="hs-identifier hs-var">_delta</span></a></span></span><span> </span><span id="local-6989586621681145978"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681145978"><span class="hs-identifier hs-var">prec</span></a></span></span><span> </span><span id="local-6989586621681145977"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681145977"><span class="hs-identifier hs-var">cl</span></a></span></span><span> </span><span id="local-6989586621681145976"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145976"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; Bool
</span><a href="GHC.Core.ConLike.html#conLikeIsInfix"><span class="hs-identifier hs-var">conLikeIsInfix</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681145977"><span class="hs-identifier hs-var">cl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145976"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-181"></span><span>      </span><span class="hs-special">[</span><span id="local-6989586621681145974"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145974"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681145973"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145973"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681145972"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681145972"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#funPrec"><span class="hs-identifier hs-var">funPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145974"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-182"></span><span>                   </span><span id="local-6989586621681145970"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681145970"><span class="hs-identifier hs-var">y'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#funPrec"><span class="hs-identifier hs-var">funPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145973"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-183"></span><span>                   </span><span class="annot"><span class="annottext">SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#cparen"><span class="hs-identifier hs-var">cparen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681145978"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#opPrec"><span class="hs-identifier hs-var">opPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681145972"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681145977"><span class="hs-identifier hs-var">cl</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681145970"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span>      </span><span class="hs-comment">-- can it be infix but have more than two arguments?</span><span>
</span><span id="line-185"></span><span>      </span><span id="local-6989586621681145966"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145966"><span class="hs-identifier hs-var">list</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pprConLike:&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145966"><span class="hs-identifier hs-var">list</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145976"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConLike -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681145977"><span class="hs-identifier hs-var">cl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681145963"><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681145963"><span class="hs-identifier hs-var">args'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc)
-&gt; [Id] -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity [SDoc]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; Id -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pprPmVar"><span class="hs-identifier hs-var">pprPmVar</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145976"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-188"></span><span>                   </span><span class="annot"><span class="annottext">SDoc -&gt; RWST Delta () (DIdEnv SDoc, [SDoc]) Identity SDoc
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#cparen"><span class="hs-identifier hs-var">cparen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621681145978"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#funPrec"><span class="hs-identifier hs-var">funPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConLike -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681145977"><span class="hs-identifier hs-var">cl</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681145963"><span class="hs-identifier hs-var">args'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="hs-comment">-- | The result of 'pmExprAsList'.</span><span>
</span><span id="line-191"></span><span class="hs-keyword">data</span><span> </span><span id="PmExprList"><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmExprList"><span class="hs-identifier hs-var">PmExprList</span></a></span></span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NilTerminated"><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#NilTerminated"><span class="hs-identifier hs-var">NilTerminated</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-193"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="WcVarTerminated"><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#WcVarTerminated"><span class="hs-identifier hs-var">WcVarTerminated</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#NonEmpty"><span class="hs-identifier hs-type">NonEmpty</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="hs-comment">-- | Extract a list of 'Id's out of a sequence of cons cells, optionally</span><span>
</span><span id="line-196"></span><span class="hs-comment">-- terminated by a wildcard variable instead of @[]@. Some examples:</span><span>
</span><span id="line-197"></span><span class="hs-comment">--</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- * @pmExprAsList (1:2:[]) == Just ('NilTerminated' [1,2])@, a regular,</span><span>
</span><span id="line-199"></span><span class="hs-comment">--   @[]@-terminated list. Should be pretty-printed as @[1,2]@.</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- * @pmExprAsList (1:2:x) == Just ('WcVarTerminated' [1,2] x)@, a list prefix</span><span>
</span><span id="line-201"></span><span class="hs-comment">--   ending in a wildcard variable x (of list type). Should be pretty-printed as</span><span>
</span><span id="line-202"></span><span class="hs-comment">--   (1:2:_).</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- * @pmExprAsList [] == Just ('NilTerminated' [])@</span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#pmExprAsList"><span class="hs-identifier hs-type">pmExprAsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#Delta"><span class="hs-identifier hs-type">Delta</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltCon"><span class="hs-identifier hs-type">PmAltCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.Ppr.html#PmExprList"><span class="hs-identifier hs-type">PmExprList</span></a></span><span>
</span><span id="line-205"></span><span id="pmExprAsList"><span class="annot"><span class="annottext">pmExprAsList :: Delta -&gt; PmAltCon -&gt; [Id] -&gt; Maybe PmExprList
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#pmExprAsList"><span class="hs-identifier hs-var hs-var">pmExprAsList</span></a></span></span><span> </span><span id="local-6989586621681145962"><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681145962"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; PmAltCon -&gt; [Id] -&gt; Maybe PmExprList
</span><a href="#local-6989586621681145961"><span class="hs-identifier hs-var">go_con</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-207"></span><span>    </span><span id="local-6989586621681145951"><span class="annot"><span class="annottext">go_var :: [Id] -&gt; Id -&gt; Maybe PmExprList
</span><a href="#local-6989586621681145951"><span class="hs-identifier hs-var hs-var">go_var</span></a></span></span><span> </span><span id="local-6989586621681145950"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145950"><span class="hs-identifier hs-var">rev_pref</span></a></span></span><span> </span><span id="local-6989586621681145949"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145949"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-208"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681145948"><span class="annot"><span class="annottext">PmAltCon
</span><a href="#local-6989586621681145948"><span class="hs-identifier hs-var">alt</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681145947"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145947"><span class="hs-identifier hs-var">_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681145946"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145946"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Delta -&gt; Id -&gt; Maybe (PmAltCon, [Id], [Id])
</span><a href="GHC.HsToCore.PmCheck.Oracle.html#lookupSolution"><span class="hs-identifier hs-var">lookupSolution</span></a></span><span> </span><span class="annot"><span class="annottext">Delta
</span><a href="#local-6989586621681145962"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145949"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-209"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; PmAltCon -&gt; [Id] -&gt; Maybe PmExprList
</span><a href="#local-6989586621681145961"><span class="hs-identifier hs-var">go_con</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145950"><span class="hs-identifier hs-var">rev_pref</span></a></span><span> </span><span class="annot"><span class="annottext">PmAltCon
</span><a href="#local-6989586621681145948"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145946"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-210"></span><span>    </span><span class="annot"><a href="#local-6989586621681145951"><span class="hs-identifier hs-var">go_var</span></a></span><span> </span><span id="local-6989586621681145945"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145945"><span class="hs-identifier hs-var">rev_pref</span></a></span></span><span> </span><span id="local-6989586621681145944"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145944"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-211"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681145943"><span class="annot"><span class="annottext">NonEmpty Id
</span><a href="#local-6989586621681145943"><span class="hs-identifier hs-var">pref</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Maybe (NonEmpty Id)
forall a. [a] -&gt; Maybe (NonEmpty a)
</span><a href="../../base/src/Data.List.NonEmpty.html#nonEmpty"><span class="hs-identifier hs-var">nonEmpty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; [Id]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145945"><span class="hs-identifier hs-var">rev_pref</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PmExprList -&gt; Maybe PmExprList
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NonEmpty Id -&gt; Id -&gt; PmExprList
</span><a href="GHC.HsToCore.PmCheck.Ppr.html#WcVarTerminated"><span class="hs-identifier hs-var">WcVarTerminated</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty Id
</span><a href="#local-6989586621681145943"><span class="hs-identifier hs-var">pref</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681145944"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-213"></span><span>    </span><span class="annot"><a href="#local-6989586621681145951"><span class="hs-identifier hs-var">go_var</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-214"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe PmExprList
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621681145961"><span class="annot"><span class="annottext">go_con :: [Id] -&gt; PmAltCon -&gt; [Id] -&gt; Maybe PmExprList
</span><a href="#local-6989586621681145961"><span class="hs-identifier hs-var hs-var">go_con</span></a></span></span><span> </span><span id="local-6989586621681145941"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145941"><span class="hs-identifier hs-var">rev_pref</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.HsToCore.PmCheck.Types.html#PmAltConLike"><span class="hs-identifier hs-type">PmAltConLike</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681145940"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681145940"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681145939"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681145939"><span class="hs-identifier hs-var">es</span></a></span></span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681145940"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; DataCon -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="GHC.Builtin.Types.html#nilDataCon"><span class="hs-identifier hs-var">nilDataCon</span></a></span><span>
</span><span id="line-218"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">es</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">Just</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">NilTerminated</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">reverse</span><span> </span><span class="hs-identifier">rev_pref</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681145940"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; DataCon -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="GHC.Builtin.Types.html#consDataCon"><span class="hs-identifier hs-var">consDataCon</span></a></span><span>
</span><span id="line-220"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">length</span><span> </span><span class="hs-identifier">es</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-number">2</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">go_var</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">es</span><span> </span><span class="hs-operator">!!</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-glyph">:</span><span> </span><span class="hs-identifier">rev_pref</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">es</span><span> </span><span class="hs-operator">!!</span><span> </span><span class="hs-number">1</span><span class="hs-special">)</span><span>
</span><span id="line-221"></span><span>    </span><span class="annot"><a href="#local-6989586621681145961"><span class="hs-identifier hs-var">go_con</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">PmAltCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-222"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe PmExprList
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-223"></span></pre></body></html>